
const state = {
	sysInfo: {},
	osName: ""
}

const mutations = {
	SET_OS_NAME(state, data){
		state.osName = data;
	},
	SET_SYS_INFO(state, data){
		state.sysInfo = data
	}
}
 
const actions = {
	getSystemInfo({ commit }){
		uni.getSystemInfo({
			success: r=> {
				console.log(r,'系统信息')
				commit("SET_OS_NAME", r.osName)
				commit("SET_SYS_INFO", r)
			}
		})
	}
}

export default {
	namespaced: true,
	state,
	mutations,
	actions
}